package com.zenchn.enums;

/**
 * @author wlf
 * @version 1.0
 * @date 2020/7/27 17:58:59
 */
public enum MessageSendStatusEnum {
    /**
     * 发送成功
     **/
    SUCCESS_SEND(1,"发送成功"),

    /**
     * 未发送
     **/
    NOT_SEND(0,"未发送"),

    /**
     * 发送失败
     * */
    FAIL_SEND(-1,"发送失败");

    MessageSendStatusEnum(Integer statusCode, String statusName) {
        this.statusCode = statusCode;
        this.statusName = statusName;
    }

    /**
     * 类别编码
     **/
    private Integer statusCode;
    /**
     * 类别名称
     **/
    private String statusName;


    public static String getDesc(Integer statusCode) {
        for (MessageSendStatusEnum e : values()) {
            if (e.getStatusCode().equals(statusCode)) {
                return e.getStatusName();
            }
        }
        return "";
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
}
